package eliauk.fun.flowabledemo.service;

import eliauk.fun.flowabledemo.vo.TaskVo;
import org.flowable.task.api.Task;
import org.flowable.task.api.history.HistoricTaskInstance;

import java.util.List;


public interface MyTaskService {
    TaskVo convertToTaskVo(Task task);

    TaskVo convertToTaskVo(HistoricTaskInstance task);

    List<TaskVo> convertToTaskVo(List<Task> tasks);

    List<TaskVo> convertToTaskVos(List<HistoricTaskInstance> tasks);

    TaskVo getTask(String taskId);

    /**
     * 终止流程
     *
     * @param processInstanceId 流程id
     */
    void terminateProcess(String processInstanceId,String reason);

    void rollbackTask(String taskId, String reason);
}
